import request from '@/utils/request'
export default {
  /**
   * 收鸽清单列表
   * @param data
   */
  listReceipt: (data) => {
    return request({
      url: '/receipt/list',
      method: 'post',
      data: data
    })
  },

  addReceipt: (data) => {
    return request({
      url: '/receipt/new',
      method: 'post',
      data: data
    })
  },
  /**
   *
   * 修改清单列表
   */
   updateReceipt: (data) => {
    return request({
      url: '/receipt/update',
      method: 'post',
      data: data
    })
  },

  /**
   * 变更抓取方式
  */
  updateStatus: (data) => {
    return request({
      url: '/receipt/update/status',
      method: 'post',
      data: data
    })
  },

  /**
   * 变更上报方式
   */
  updateReport: (data) => {
    return request({
      url: '/receipt/update/report',
      method: 'post',
      data: data
    })
  },

  /**
   * 重置任务
   */
  resetReceipt: (data) => {
    return request({
      url: '/receipt/job/reset',
      method: 'post',
      data: data
    })
  },

  /**
   * 立刻上报
   */
  reportReceipt: (data) => {
    return request({
      url: '/receipt/report/xls',
      method: 'post',
      data: data
    })
  },

  /**
   * 清理源文件
   */
  removeReceipt: (data) => {
    return request({
      url: '/receipt/remove',
      method: 'post',
      data: data
    })
  },

  /**
   * 下载
   */
  downLoad: (id) => {
      return request({
        url: '/receipt/download/xls?id='+id,
        method: 'get',
        responseType: 'blob'
      })
  },

  /**
   * 羽数校验
   */
   checkAmount: (data) => {
    return request({
      url: '/receipt/check',
      method: 'post',
      data: data
    })
  },

  /**
   * 代理剩余时间
   */
  remainder: (data) => {
    return request({
      url: '/proxy/remainder',
      method: 'post',
      data: data
    })
  },
}
